package com.example.demo.service;

import com.example.demo.entity.*;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface RoleService {

    Integer addRole(Role role);
    Integer delRole(Integer roleId);
    Integer addEmployeeRole(Integer employeeId, Integer roleId);
    Integer delEmployeeRole(Integer employeeId);
    Integer addRolePermission(Role role, Integer permissionId);
    Integer delRolePermission(RolePermission rolePermission);
    List<Role> selectAllRoles();
    Integer saveOrUpdate(Integer roleId,Integer[] permissionId);
    List<EmployeeVo> selectEmployeesByBusinessId(Integer businessId);

    EmployeeVo selectEmployeeByEmployeeId(Integer employeeId);

    void updateEmployee(Employee employee);

    Integer addEmployee(Employee employee);

//    List<Permission> selectPermissionById(Integer permission_id);
//
//    List<Permission> selectPermissionNotBase();
    List<Permission> iteratePermission(List<Permission> permissionList,Integer pid);

    int updateRole(Role role);
}
